package com.cnwidsom.filter;

/**
 * 过滤/拦截器基础接口
 * 
 * @author Administrator
 *
 */
public interface Filter extends Comparable<Filter> {
	/**
	 * 中断异常,用于控制filter责任链中的退出机制 当发生此异常时,应中断filter以后的逻辑执行,并返回
	 * 
	 * @author Administrator
	 *
	 */
	public static class BreakException extends Exception {
		private static final long serialVersionUID = 1L;
	}

	public String getFilterName();

	public void filter(FilterChain chain, Object obj) throws BreakException;
}
